package com.task.core.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.task.common.domain.info.KeyAndValue;
import com.task.core.domain.DatasourceGroupInfo;
import com.task.core.dto.request.DatasourceGroupRequestDTO;

/**
 * @author 迪迦.
 * @date 2024/11/4 17:30
 */
@Mapper
public interface DatasourceGroupMapper {

  List<DatasourceGroupInfo> getDatasourceGroupByPage(DatasourceGroupRequestDTO request);

  DatasourceGroupInfo getDatasourceGroupByCode(DatasourceGroupRequestDTO request);

  List<KeyAndValue> getDatasourceGroupForOption(DatasourceGroupRequestDTO request);

  void addDatasourceGroup(DatasourceGroupRequestDTO request);

  Integer modifyDatasourceGroup(DatasourceGroupRequestDTO request);

  Integer deleteDatasourceGroup(@Param("code") String refererSourceCode, @Param("userId") Long userId);

  DatasourceGroupInfo getDatasourceGroupDetailByCode(DatasourceGroupRequestDTO datasourceGroupRequestDTO);
}
